﻿<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/qautil.tld" prefix="qautil"%>
<%@ page import="com.mr.qa.SpendMoneyConstants" %>
<jsp:include page="viewmyinfo.jsp"/>
<br>
<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>   
            <span class="title">
            	<html:link page="/user.mrqa?action=myquestions">
            		我的帖子
            	</html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=myanswers">
            		我的回复
            	</html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=viewmysharedfiles">
            		共享资料
            	</html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=mylinks">
            		我的收藏
            	</html:link>
            </span>
            <span class="title1">
            	<html:link page="/user.mrqa?action=myspend">
            		积分兑换
            	</html:link>
            </span>
            <span class="title">
            	<html:link page="/user.mrqa?action=myaward">
            		积分奖励
            	</html:link>
            </span>
        </td>
        <td align="right">总兑换积分:<b><c:out value="${0-spendAmount}"/></b>&nbsp;&nbsp;</td>
    </tr>
</table>    
<table align="center" class="qlist" width="100%" cellpadding="0" cellspacing="0">
    <thead>
    <tr>
        <th>兑换类型</th>
        <th>兑换内容</th>
        <th>兑换金额</th>
        <th>兑换时间</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach  var="userMoneySpendHistory" items="${spendList}" varStatus="index">
    <c:if test="${(index.count)%2 == 0}">
      <tr class="even">    
    </c:if>
    <c:if test="${(index.count)%2 != 0}">
      <tr class="odd">    
    </c:if>
        <td>
        	<jsp:useBean id="id" scope="request" class="com.mr.qa.SpendMoneyConstants" >
        	</jsp:useBean>
						<c:out value="${id.moneyTypeMap[userMoneySpendHistory.description]}" escapeXml="false"/>
        </td>
        <td>
           <c:out value="${userMoneySpendHistory.resourceName}" escapeXml="false"/>
        </td>
        <td>
        	<c:out value="${0-userMoneySpendHistory.money}" escapeXml="false"/>
        </td>
        <td>
            <fmt:formatDate value="${userMoneySpendHistory.date}" var="postDatexx" type="both" pattern="yyyy-MM-dd HH:mm:ss"/><c:out value="${postDatexx}"/>
        </td>
    </tr>
    </c:forEach>
    </tbody>
</table>
<qautil:page action="/user.mrqa"/>